package Library.User;

import Library.BookList;
import Library.operation.IOperation;

public abstract class User {
    protected String name;
    protected IOperation[] ioperation;
    public abstract int menu();
    public User(String name){
        this.name = name;
    }


    public void work(int choice, BookList bookList) {
        if(choice < 0 || choice >= ioperation.length){
            System.out.println("输入错误");
            return;
        }
        ioperation[choice].work(bookList);
    }
}
